import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
  
  {
    title: '下单客户',
    align: "center",
    dataIndex: 'bookUser'
  },
  {
    title: '产品名称',
    align: "center",
    dataIndex: 'requiredProduct_dictText'
  },
  {
    title: '需求量（L）',
    align: "center",
    dataIndex: 'orderNum'
  },
  {
    title: '订单状态',
    align: "center",
    dataIndex: 'orderStatus'
  },
  {
    title: '下单日期',
    align: "center",
    dataIndex: 'createTime'
  },
];

//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: "下单客户",
    field: 'bookUser',
    component: 'Input',
    colProps: {span: 6},
  },
  {
    label: "产品名称",
    field: 'requiredProduct',
    component: 'JSearchSelect',
    componentProps:{
      dict: "camellia_mes_product,name,id"
    },
    colProps: {span: 6},
  },
  {
    label: "订单状态",
    field: 'orderStatus',
    component: 'Input',
    colProps: {span: 6},
  },
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '下单客户',
    field: 'bookUser',
    component: 'Input',
  },
  {
    label: '产品名称',
    field: 'requiredProduct',
    component: 'JSearchSelect',
    componentProps:{
      dict: "camellia_mes_product,name,id"
    },
  },
  {
    label: '需求量（L）',
    field: 'orderNum',
    component: 'InputNumber',
  },
	// TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];
